package com.hnust.root.common.model;

import com.hnust.root.dao.entity.domain.Permission;
import com.hnust.root.dao.entity.domain.Role;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.List;

/**
 * Description  : 角色信息
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class SysRole extends Role implements Serializable {

    private static final long serialVersionUID = 1L;

    // 拥有的权限列表
    private List<Permission> permissions;

    @Override
    public String toString() {
        return "SysRole{" +
                " id=" + getId() +
                " rolename=" + getRole() +
                " desc=" + getDescription() +
                " createTime=" + getCreateTime() +
                " updateTime=" + getUpdateTime() +
                " permissions=" + permissions +
                '}';
    }
}
